package sctu.edu.java.year2016.team06.chenqiang.day20160606.chapter11_3;

/**
 * Created by XQ on 2016/6/6.
 */
public class MyException extends Exception {
    public MyException(int x, int y) {
        System.out.println("数据出现负整数！");
        if (x < 0 && y < 0) {
            System.out.println("错误数据是：" + x + y);
        } else if (x < 0 && y > 0) {
            System.out.println("错误数据是：" + x);
        } else if (x > 0 && y < 0) {
            System.out.println("错误数据是：" + y);
        }
    }
}
